//
// Created by konglinglong on 2020/4/19.
//

//#define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN
//#include "doctest.h"

#define DOCTEST_CONFIG_IMPLEMENT

#include "lib/doctest.h"

int main(int argc, char** argv)
{
    int res;
    {
        doctest::Context context;

//        context.setOption("reporters", "junit,xml");
//        context.setOption("out", "RAN_TEST_REPORT1.xml");

        context.addFilter("test-suite-exclude", "SYSTEM_TS");
        context.addFilter("test-suite-exclude", "OS_MEM_TS");

        context.applyCommandLine(argc, argv);
        res = context.run();
        if (context.shouldExit())
        {
            return res;
        }

    }
    {
        doctest::Context context;

//        context.setOption("reporters", "junit,xml");
//        context.setOption("out", "RAN_TEST_REPORT3.xml");

        context.addFilter("test-suite", "OS_MEM_TS");

        context.applyCommandLine(argc, argv);
        res = context.run();
        if (context.shouldExit())
        {
            return res;
        }
    }
    {
        doctest::Context context;

//        context.setOption("reporters", "junit,xml");
//        context.setOption("out", "RAN_TEST_REPORT2.xml");

        context.addFilter("test-suite", "SYSTEM_TS");
//        context.addFilter("test-case", "SYSTEM_TC_OM_CONFIG");

        context.applyCommandLine(argc, argv);
        res = context.run();
        if (context.shouldExit())
        {
            return res;
        }
    }
    return res;
}
